package entityDAOs;

import java.util.Date;
import java.util.List;
import org.hibernate.LockMode;
import org.hibernate.Query;
import static org.hibernate.criterion.Example.create;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import entities.Charater;
import entities.Complaint;

/**
 * A data access object (DAO) providing persistence and search support for
 * Complaint entities. Transaction control of the save(), update() and delete()
 * operations can directly support Spring container-managed transactions or they
 * can be augmented to handle user-managed Spring transactions. Each of these
 * methods provides additional information for how to configure it for the
 * desired type of transaction control.
 * 
 * @see entities.Complaint
 * @author MyEclipse Persistence Tools
 */

public class ComplaintDAO extends BaseHibernateDAO<Complaint,java.lang.Integer> {
	private static final Logger log = LoggerFactory
			.getLogger(ComplaintDAO.class);
	// property constants
	public static final String TEXT = "text";
	public static final String TYPE = "type";
	public static final String STATE = "state";

	public List<Complaint> findByText(Object text) {
		return findByProperty(TEXT, text);
	}

	public List<Complaint> findByType(Object type) {
		return findByProperty(TYPE, type);
	}

	public List<Complaint> findByState(Object state) {
		return findByProperty(STATE, state);
	}
}